home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / charger.zip / CHARGER.DOC next >
Text File  |  1986-06-18  |  8KB  |  176 lines

  1. BC - Backup Copy Routine
  2.         by Douglas E. MacLean
  3.  
  4. BC is very similar to the standard DOS COPY routine. The important difference
  5. is that BC will first check the destination for a copy of the file to be
  6. transfered. If the destination file is more recent than the source the file
  7. will not be copied. If a wild card is used to copy files and a file will not
  8. fit on the disk, you will be prompted to insert a new formatted disk.
  9.  
  10. If you enter BC without paramters, you wil be shown the command's format.
  11.  
  12. The parameters for BC are the same as for COPY.
  13.  
  14. BC a:*.exe b:
  15.  
  16. will search for files with the extent 'exe' on the a: drive. If the files
  17. found are newer than those on b: (or a copy does not exist on b:) then it
  18. will be copied.
  19.  
  20. An excellant use for BC is to keep your backup diskettes (you should be
  21. keeping a current backup, now there is no excuse) up to date. With BC
  22. copy time is cut down since only newer files are copied. It is also not
  23. possible to overwrite a latter version with a former one.
  24.  
  25. If you find BC useful my family and I would appreciate a contribution. Any
  26. contribution of $15 (or more) will put you on my mailing list (unless you
  27. tell me not to) and entitle you to free updates and revisions. Write for a
  28. catalog of other Utilities or keep watching this BBS.
  29.             Thank you for your interest in my work!
  30.  
  31.             Douglas E. MacLean
  32.             2200 Ocean Avenue Apt. 6B
  33.             Brooklyn, New York 11229
  34.             
  35.     
  36.                      T U R B O   S U P E R C H A R G E R 
  37.     
  38.                   b y   D o u g l a s   E .   M a c L e a n 
  39.     
  40.     
  41.                          S C R E E N   D I S P L A Y 
  42.     
  43.     FUNCTION AT(horiz,vert):char;
  44.            Provides GOTOXY from within a WRITE statement.
  45.            WRITE(AT(5,10),'TESTING');
  46.     
  47.     FUNCTION BRIGHT:CHAR; <IBM>   FUNCTION INVERSE:CHAR; <APPLE>
  48.            Selects  bright or inverse screen display from within a WRITE 
  49.     statement.
  50.     
  51.     FUNCTION DIM:CHAR; <IBM>      FUNCTION NORMAL:CHAR; <APPLE>
  52.            Selects  dim  or  normal mode of screen display from within a 
  53.     WRITE statement.
  54.            WRITE(DIM,'HIT ',BRIGHT,'RETURN',DIM,' TO CONTINUE');
  55.     
  56.                           S C R E E N   E R A S E S 
  57.     
  58.     PROCEDURE WIPEUP(T:INTEGER);
  59.            Erases  the  screen  bottom  to  top  with  a  delay  of  'T' 
  60.     milliseconds.
  61.     
  62.     PROCEDURE WIPEDOWN(T:INTEGER);
  63.            Erases  the  screen  top  to  bottom  with  a  delay  of  'T' 
  64.     milliseconds.
  65.     
  66.     PROCEDURE SCROLL(L,T:INTEGER);
  67.            Scrolls  the  screen  up  'L' number of lines with a delay of 
  68.     'T' milliseconds.
  69.     
  70.     
  71.                      S T R I N G   F O R M A T T I N G 
  72.     
  73.     FUNCTION PADLEFT(S:STR80;N:INTEGER):STR80;
  74.            Pads  the string 'S' with spaces upto a length of 'N'. If 'S' 
  75.     is  equal  to  or greater then 'N' characters in length no action is 
  76.     taken. The original string is not altered.
  77.     
  78.     FUNCTION PADRIGHT(S:STR80;N:INTEGER):STR80;
  79.            Same as PADLEFT only the spaces are padded to the right.
  80.     
  81.     FUNCTION LSTRING(S:STR80;N:INTEGER):STR80;
  82.            Isolates the 'N' most characters of the string 'S'. 
  83.     LSTRING('ABCDEFGH',3)  returns  ABC.  The  original  string  is  not 
  84.     altered.
  85.     
  86.     FUNCTION RSTRING(S:STR80;N:INTEGER):STR80;
  87.            The  same  as  LSTRING  only  the  rightmost  characters  are 
  88.     isolated.
  89.     
  90.                           S C R E E N   O U T P U T 
  91.     
  92.     PROCEDURE CENTER(LINE:INTEGER;S:STR80);
  93.            Centers the given string on the indicated line.
  94.     
  95.     PROCEDURE LPRINT(S:STR80;T,X,Y:INTEGER);
  96.            Slowly  prints  string 'S' from right to left with a delay of 
  97.     'T'  milliseconds. The first character (the last printed) will be at 
  98.     screen location 'X', 'Y'.
  99.     
  100.     PROCEDURE RPRINT(S:STR80;T,X,Y:INTEGER);
  101.            Same  as LPRINT only the direction is from left to right. The 
  102.     first  character  of  the string will be the first character printed 
  103.     and its location will be 'X','Y'.
  104.     
  105.     PROCEDURE FRAME(LINE:INTEGER;S:STR80);
  106.            Frames  the  given  string  with  '*'.  The first line of the 
  107.     frame will be line 'L' and all lines are centered.
  108.     
  109.     
  110.                          K E Y B O A R D   I N P U T 
  111.     
  112.     FUNCTION GETCHAR(OKSET:CHARSET;DISPLAY:BOOLEAN):CHAR;
  113.            Returns  a  string  composed of characters from OKSET. If any 
  114.     other  key  is  pressed  a  beep  is returned. Echo to the screen is 
  115.     controlled  by  the  boolean  'DISPLAY',  if true then the result is 
  116.     sent to the screen.
  117.     
  118.     FUNCTION GETSTRING(OKSET:CHARSET;MAXLEN:INTEGER):STR80;
  119.            Returns  a  string  composed  of characters from OKSET upto a 
  120.     maximum  of  'MAXLEN'  characters.  RETURN  terminates entry. A beep 
  121.     will  sound  if either an illegal character is entered of an attempt 
  122.     is  made  to  exceed  the  maximum length. Backspace erases the last 
  123.     character  and  CTRL-X  will  cancel  the  current input and restart 
  124.     entry.
  125.     
  126.                 M E N U   S E L E C T I O N   R O U T I N E S 
  127.     
  128.     PROCEDURE POINTER(VAR CP:INTEGER;MAX,X,Y:INTEGER);
  129.            Places  a '>' next to a menu for selection. CP is the default 
  130.     and  starting  postion  of  the  arrow head. If 'ESC' is pressed the 
  131.     defalut  is  returned  no matter what the current value is. 'RETURN' 
  132.     will  return  the current position of the arrow head. The arrow head 
  133.     will start in column 'X' on line 'Y'. 
  134.            Setup  the menu so that the first letter of each selection is 
  135.     two  columns  to  the  rigth of the 'X' value passed to POINTER. For 
  136.     example,  if  you  use  Write(At(10,5)'ENTER  DATA');  as your first 
  137.     selection use POINTER(cp,max,8,5). Lines must be consectutive.
  138.            'CP'  is  the  item  number of the current pointer and may be 
  139.     used to select an option by means of a case statement.
  140.     
  141.     FUNCTION LETTER(S:STR80):CHAR;
  142.            Takes  a string and separates the first letter by a ')' and a 
  143.     space.  It  also  highlites  the  letter  that  is  separated.  This 
  144.     procedure  is  useful  when  listing  a  choice  for  selection. For 
  145.     example:
  146.                    WRITE(letter('Main Menu'));
  147.     
  148.     will result in the output:
  149.                    M) ain Menu
  150.     
  151.     Use in conjunction with the next procedure.
  152.     
  153.     FUNCTION CHOICES(S:STR80):CHAR;
  154.            This  routine  is  also  used  from within a write statement. 
  155.     This  routine  will prompt for various selections based upon letters 
  156.     given  in a string. Display the options with Letters, use GetChar to 
  157.     restrict  input  to  only  the  choices  given  and  prompt  for the 
  158.     choices. For example the prompt line may look like:
  159.     
  160.                   WRITE(choices('EADQ'));
  161.     
  162.     will result in the output:
  163.                  Please Select: E) A) D) Q)
  164.  
  165.  
  166. If you find this useful my family and I would appreciate a contribution. Any
  167. contribution of $25 (or more) will put you on my mailing list (unless you
  168. tell me not to) and entitle you to free updates and revisions. Write for a
  169. catalog of other Utilities or keep watching this BBS.
  170.             Thank you for your interest in my work!
  171.  
  172.             Douglas E. MacLean
  173.             2200 Ocean Avenue Apt. 6B
  174.             Brooklyn, New York 11229
  175.             
  176.